package com.example.jcservice.client;

import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Var;
import com.dtflys.forest.callback.OnLoadCookie;
import com.dtflys.forest.callback.OnSaveCookie;
import com.dtflys.forest.http.ForestResponse;

public interface JcLibrary {
    //登录图书馆，获取cookie
    @Post(url = "http://jccxxt.scujcc.cn/pages/include/checklogin.jsp?username=${a}&password=${b}&loginType=callNo&validCode")
    ForestResponse login(@Var("a") String a, @Var("b") String b, OnSaveCookie onSaveCookie);

//    @Post(url = "http://jccxxt.scujcc.cn/pages/include/checklogin.jsp?username=194020207&password=MTAwMDU5&loginType=callNo&validCode")
//    ForestResponse saveLogincookie(OnSaveCookie onSaveCookie);


    //带cookie访问图书馆个人主页
    @Get(url = "http://jccxxt.scujcc.cn/opac/mylibrary")
    ForestResponse userIndex(OnLoadCookie onLoadCookie);


    //带cookie访问个人借书详情页面
    @Get(url = "http://jccxxt.scujcc.cn/opac/mylibrary/borrowBooks")
    ForestResponse bookAfterLogin(OnLoadCookie onLoadCookie);
}
